package com.itheima.user.service;

import com.itheima.user.mapper.UserMapper;
import com.itheima.user.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

/**
 * @author 29143
 */
@Service
public class UserService {

    @Autowired
    private UserMapper userMapper;

    @Value("${server.port}")
    int port;

    public User findUserById(Long id){
        User user = userMapper.findById(id);
        user.setAddress(port+" ");
        return user;

    }

}
